//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;

namespace Microsoft.Research.ScientificWorkflow.WorkflowApplicationCommonSL
{
    public static class TridentErrorHandler
    {
        /// <summary>
        /// Throws TridentCustomException
        /// </summary>
        /// <param name="errorMessage">error megssage.</param>
        /// <param name="innerException">Inner exception</param>
        /// <returns></returns>
        public static TridentCustomException ThrowTridentCustomException(
            string errorMessage,
            Exception innerException)
        {
            throw new TridentCustomException(errorMessage, innerException);
        }

        /// <summary>
        /// Throws TridentCustomException
        /// </summary>
        /// <param name="errorMessage">error megssage.</param>
        /// <returns></returns>
        public static TridentCustomException ThrowTridentCustomException(string errorMessage)
        {
            throw new TridentCustomException(errorMessage);
        }

    }
}
